import axios from 'axios'

export default class  {
   
    //添加进度款申请信息
    Addperform(apply,projectId,providerId,ctr_id){
        return axios.get(`http://localhost/smj_perform`,{
            params:{
                'apply_date':apply.apply_date,
                'p_id':projectId ,
                'ctr_id':ctr_id,
                'company_id':providerId,
                'perform_name':apply.perform_name,
                'contract_amount':apply.contract_amount,
                'penalty':apply.penalty,
                'withhold':apply.withhold,
                'agree_amount':apply.agree_amount,
                'agree_upper':apply.agree_upper,
                'handler_id':apply.handler_id,
                'settle_comment':apply.settle_comment,
                'attach_ids':apply.attach_ids,
            }
        })
    }

    //添加进度宽申请工程量清单
    AddWorkList(tenderPurchaseDetails,id){
        return axios.get(`http://localhost/smj_perform/work_list`,{
            params:{
                'perform_id':id,
                'work_content':tenderPurchaseDetails.work_content ,
                'work_count':tenderPurchaseDetails.work_count,
                'unit':tenderPurchaseDetails.unit,
                'unit_price':tenderPurchaseDetails.unit_price,
                'snumber':tenderPurchaseDetails.snumber,
                'hnumber':tenderPurchaseDetails.hnumber,
                'comment':tenderPurchaseDetails.comment,
            }
        })
    }

    //提交审批
    FlowPerform(apply){
        return axios.post(`http://localhost/smj_perform/Flow_Perform`,apply)
    }

    //查看完工结算列表
    listPerform(params){
        return axios.get(`http://localhost/smj_perform/listPerform`,{
            params:params
        })
    }

    //获取工程量清单
    getWorkList(id){
        return axios.get(`http://localhost/smj_perform/getWorkList`,{
            params:{
                'perform_id':id
            }
        })
    }

    //获取审批流程
    getfromaudit(id){
        return axios.get(`http://localhost/smj_perform/getfromaudit`,{
            params:{
                'perform_id':id
            }
        })
    }

    

}